package com.hopu.sprtingboot2025070801.controller;

import com.hopu.sprtingboot2025070801.entity.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class demo2 {

    List<User> users = new ArrayList<User>();

    @RequestMapping("add")
    public List<User> hello(User user){
        users.add(user);
        System.out.println(users);
       return users;
    }}
